import axios from "./axios"

export default {
    // 学生
    getStudentList: (data) => {
        return axios({
            method: "get",
            url: "/student/toPage",
            params: {
                "pageNo": data.pageNo,
                "pageSize": data.pageSize,
                "userName": data.userName
            }
        })
    },

    deleteStu: (id) => {
        return axios({
            method: "delete",
            url: "/student/delete/"+id,
        })
    },

    editStu: (data) =>{
        return axios({
            method: "post",
            url: "/student/addOrUpdate",
            data
        })
    },

    // 教师
    getTeacherList: (data) => {
        return axios({
            method: "get",
            url: "/teacher/toPage",
            params: {
                "pageNo": data.pageNo,
                "pageSize": data.pageSize,
                "name": data.name
            }
        })
    },

    deleteTeacher: (id) => {
        return axios({
            method: "delete",
            url: "/teacher/delete/"+id,
        })
    },

    editTeacher: (data) =>{
        return axios({
            method: "post",
            url: "/teacher/addOrUpdate",
            data
        })
    },

}